package com.xiaoshuidi.cloud.module.finance.dal.dataobject.finance;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.xiaoshuidi.cloud.framework.tenant.core.db.TenantBaseDO;
import lombok.*;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@TableName(value = "finance_account", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FinanceAccountDO extends TenantBaseDO {
    @TableId
    private Integer id;
    /**
     * 关联客户id
     */
    private String custId;
    /**
     * 关联客户类型(个人INDIVIDUAL/企业COMPANY/房间ROOM)
     */
    private String custType;
    private String custName;
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> prop;

    /**
     * 账户合并记录
     */
    @TableField(value = "migration", typeHandler = JacksonTypeHandler.class)
    private List<AccountMigrationDO> accountMigrationList;
    /**
     * 账户类型(现金等)
     */
    private String accountType;

    private String mobile;
    /**
     * 余额
     */
    private java.math.BigDecimal balance;
    /**
     * 冻结余额
     */
    private java.math.BigDecimal frozen;
    private String status;

    private LocalDateTime lastWarningSmsSendTime;
}
